package ru.samgtu.wst.plugin;

import java.util.List;
import java.util.ArrayList;
import java.util.logging.Logger;

public class Hook {

	private String _name;
	private String _description;
	private List _scripts = new ArrayList();
	// protected BSFManager _bsfManager = null;
	// private ScriptManager _scriptManager = null;

	private Logger _logger = Logger.getLogger(getClass().getName());

	/** Creates a new instance of Hook */
	public Hook(String name, String description) {
		_name = name;
		_description = description;
	}

	public String getName() {
		return _name;
	}

	public String getDescription() {
		return _description;
	}

	public int getScriptCount() {
		return _scripts.size();
	}

	public Script getScript(int i) {
		return (Script) _scripts.get(i);
	}

	public void addScript(Script script) {
		_scripts.add(script);
	}

	public void addScript(Script script, int position) {
		_scripts.add(position, script);
	}

	public Script removeScript(int position) {
		return (Script) _scripts.remove(position);
	}

}
